Currently, an electronic device, such as a rack server, includes a rack and a subrack, where the subrack is inserted into the rack. For ease of pulling the subrack out of the rack, a handle is disposed on a shell of the subrack for holding. To prevent the subrack from loosening, a buckle structure is disposed on the subrack. If the subrack needs to be pulled out of the rack, an operator needs to unfasten the buckle structure with one hand, and pull the subrack out of the rack with the other hand by using the handle, which causes an inconvenient operation. Most of handles in electronic devices in the prior art are formed by bending and soldering stainless steel round rods on shells of subracks, which are inconvenient for a user to use.